/**
 * Author: w景洋.
 */
var html5mode = true;
//var html5mode = false;
var appEnvironment = false;

var entrance_config = {
    homepage_hot: true
}

//项目根地址
var projectBaseUrl = "http://www.ngba.cn/mobile/";
//var projectBaseUrl = "index.html#/";

//// payment config
var ent_payconfig = {
    wxpay_url: "http://localhost:8080/wxpay/",
    wxpay_spid: "1342715001",
    wxpay_appid: "wx43756321dbcb0dda",
    wxpay_backurl: "http://www.nonggui8.com/mobile/",
    wxpay_reaurl: "http://api.nonggui8.com/wxpayjsapi/wxpay/",

    alipay_url: "http://api.nonggui8.com/alipaywap/paywap/",
    alipay_appid: "2088121745056849",
    alipay_callback: "http://114.55.90.31/ngb/"
};
var ent_templateprefix = 'entrance/view/';

//mall
var mallurl = "http://api.nonggui8.com/ngbmall/";
var mallorder = "http://api.nonggui8.com/ngbmallorder/";
var mall_uc = "http://api.nonggui8.com/ngbuc/";
var mall_expert = "http://ddsorder.test.shuwang.info/expertsys/";
var mallpay_url = "http://inner.gw.shuwang.info/mall/mallpaycenter/";

var payplateurl = function(platid,userid,backurl,openid){
    var payurl = "http://pay.shuwang.info/cashier/recharge?platid="+platid+"&userid="+userid+"&backUrl"+backurl+"&openid="+openid;
    var url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+ent_payconfig.wxpay_appid+"&redirect_uri="+encodeURIComponent(payurl)+"&response_type=code&scope=snsapi_base&state=#wechat_redirect";
    return url;
};

var jumpurl = function(orderid,wxopenid,paystyle){
    var targeturl = "http://www.nonggui8.com/mobile/orderlist/2";
    return "http://inner.gw.shuwang.info/mall/mallpaycenter/orderspay/create/"+orderid+"?appid="+mall_payconfig.wxpay_appid+"&param="+wxopenid+"&jumpurl="+encodeURIComponent(targeturl)+"&paystyle="+paystyle+"&directpay=true";
};

var mall_payconfig = {
    wxpay_reaurl: "http://api.nonggui8.com/wxpayjsapi/wxpay/",
    wxpay_url: "http://localhost:8080/wxpay/",
    wxpay_spid: "1342715001",
    wxpay_appid: "wx43756321dbcb0dda",
    wxpay_backurl: "http://www.nonggui8.com/mobile/",
    wxapppay_spid: "1395760002",
    wxapppay_appid: "wx11b54b72a207d7f9",

    aliapppay_callback: "http://api.nonggui8.com/ngbmallorder/orderspay/aliapppay/callback/",
    aliapppay_url: "http://api.nonggui8.com/ngbmallorder/orderspay/aliapppay/",
    alipay_url: "http://api.nonggui8.com/ngbmallorder/orderspay/aliwappay/",
    alipay_appid: "2088121745056849",
    alipay_callback: "http://www.nonggui8.com/mobile/"
};
var templateprefix = 'mall/view/';

//uc
var uc_baseurl = "http://api.nonggui8.com/ngbuc/";
var uc_rechargeurl = "http://api.nonggui8.com/ngbuc/recharge/";

var wxucURl ='http://api.nonggui8.com/ucauth/';

var uc_payconfig = {
    wxpay_url: "http://localhost:8080/wxpay/",
    wxpay_spid: "1342715001",
    wxpay_appid: "wx43756321dbcb0dda",
    wxpay_backurl: "http://www.nonggui8.com/mobile/",
    wxpay_reaurl: "http://api.nonggui8.com/wxpayjsapi/wxpay/",

    alipay_url: "http://api.nonggui8.com/alipaywap/paywap/",
    alipay_appid: "2088121745056849",
    alipay_callback: "http://114.55.90.31/ngb/"
}
// config
var ucconfig = {
    homepage_hot: true,
};
var uc_templateprefix = 'usercenter/view/';
var exp_templateprefix = 'expert/view/';
var tab_technology =true;